#include <stdio.h>
#include <stdlib.h>
#include <uuid/uuid.h>

int main(int argc, char* argv[])
{
  uuid_t uuid,uuid2,uuid3;
  //uuid_generate_time(uuid);
  uuid_generate(uuid);
  //uuid_generate_random(uuid);
  char uuid_str[17] = {'\0'};
  uuid_unparse(uuid,uuid_str);
  printf("uuid_str  %s\n",uuid_str);


  int rc = uuid_parse(uuid_str,uuid2);

  printf("uuid_parse rc:%d %u\n",rc,uuid2);

  uuid_clear(uuid2);

  rc = uuid_parse(argv[1],uuid3);

  char *e = NULL;
  unsigned long ul =  strtoul(argv[1],&e,16);
  printf("uuid_parse rc:%d %lu %lu e:%s\n",rc,uuid3,ul,e);



  uuid_clear(uuid);
}
